package com.meilai.project.entity.finance.supplier;

import com.baomidou.mybatisplus.annotation.TableName;
import com.meilai.project.entity.BaseEntity;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;


import javax.validation.constraints.Digits;
import javax.validation.constraints.NotNull;
import java.math.BigDecimal;

@Data
@EqualsAndHashCode(callSuper = true)
@Accessors(chain = true)
@TableName("supplier_material")
public class SupplierMaterial extends BaseEntity {

    @NotNull(message = "供应商id不能为空")
    @ApiModelProperty(value = "供应商id")
    private Long supplier_id;

    @NotNull(message = "材质id不能为空")
    @ApiModelProperty(value = "材质，字典id")
    private Long material_texture_id;

    @NotNull(message = "单价不能为空")
    @Digits(integer = 10, fraction = 2, message = "单价格式不正确，最多保留2位小数")
    @ApiModelProperty(value = "单价(/平米)")
    private BigDecimal price;
}
